<?php
namespace app\index\controller;

use app\common\controller\BaseController;
use app\common\controller\UserController;
use app\common\model\User;
use app\index\console\Test;

class Index extends UserController
{

    public function menu(){
        $this->result_success([
            [
                "menu"=>"用户管理",
                "icon"=>"ios-analytics",
                "href"=>"用户管理",
                "child"=>[
                    [
                        "menu"=>"用户管理",
                        "href"=>"/user",
                    ],
                    [
                        "menu"=>"服务商",
                        "href"=>"/server",
                    ],
                    [
                        "menu"=>"雇主",
                        "href"=>"/employ",
                    ],
                ]
            ],
            [
                "menu"=>"需求管理",
                "icon"=>"ios-analytics",
                "href"=>"需求管理",
                "child"=>[
                    [
                        "menu"=>"需求",
                        "href"=>"/employ_purchase",
                    ],
                    [
                        "menu"=>"服务",
                        "href"=>"/server_good",
                    ],
                ]
            ],
            [
                "menu"=>"财务管理",
                "icon"=>"ios-analytics",
                "href"=>"2",
                "child"=>[
                    [
                        "menu"=>"财务",
                        "href"=>"/payment",
                    ],
                    [
                        "menu"=>"余额管理",
                        "href"=>"/money",
                    ],
                ]
            ],
            [
                "menu"=>"订单管理",
                "icon"=>"ios-analytics",
                "href"=>"3",
                "child"=>[
                    [
                        "menu"=>"服务订单",
                        "href"=>"/server_good_order",
                    ],
                    [
                        "menu"=>"需求订单",
                        "href"=>"/employ_purchase_order",
                    ],
                ]
            ],
            [
                "menu"=>"账号管理",
                "icon"=>"ios-analytics",
                "href"=>"账号管理",
                "child"=>[
                    [
                        "menu"=>"修改信息",
                        "href"=>"/change",
                    ],
                    [
                        "menu"=>"退出登录",
                        "href"=>"/logout",
                    ],
                ]
            ],
        ]);
    }
    /**
     * 第一个入口
     */
    public function index()
    {
        $this->result_success("hello this page url index/index/index");
    }
    /**
     * 第一个入口
     */
    public function file()
    {
        $html  = "
        <form method='post' action='http://wike.io/index/index/upload' enctype=\"multipart/form-data\">
        <input type='file'name='file'>
        <input type='file'name='file1'>
        <input type='submit'>
        </form>
        ";
        echo $html;
    }

}
